package com.flyee.controller.tools.cartoon.model
{
	import mx.collections.ArrayCollection;
	
	public class ConfigObj
	{
		[Bindable]
		public static var typeCards:ArrayCollection = new ArrayCollection();
		[Bindable]
		public static var partCards:ArrayCollection = new ArrayCollection();
		[Bindable]
		public static var dirCards:ArrayCollection = new ArrayCollection([{label:"上",data:0},{label:"右上",data:1},{label:"右",data:2},{label:"右下",data:3},{label:"下",data:4},{label:"左下",data:5},{label:"左",data:6},{label:"左上",data:7},]);
		[Bindable]
		public static var equipInfo:EquipXMLHelper = null
		
		public static var defaultConfigURL:String = "com/flyee/controller/tools/cartoon/temp/equip/"
		
		public static var appearanceTatolType:uint = 6;
		[Bindable]
		public static var absoluteURL:String = null;
		
		public function ConfigObj()
		{
		}
		public static function getConfigXML():String
		{
			var tempLength:uint = typeCards.length;
			var tempStr:String = "<config><types>"
			for(var i:int = 0; i < tempLength ; i++)
			{
				tempStr+= "<type><name>"+typeCards.getItemAt(i).label+"</name><id>"+ typeCards.getItemAt(i).data +"</id></type>"
			}
			tempStr += "</types><parts>";
			tempLength = partCards.length;
			for(i = 0; i < tempLength ; i++)
			{
				tempStr+= "<part><name>"+partCards.getItemAt(i).label+"</name><id>"+ partCards.getItemAt(i).data +"</id></part>"
			}
			tempStr+= "</parts></config>";
			return tempStr;
		}
	}
}